home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / opendoor.zip / OPENDOOR.BAK next >
Text File  |  1989-01-08  |  19KB  |  602 lines

  1. REM  OPENDOOR Release 1.0 on 1-1-89 by Fast Fingers ... 313-247-0094
  2.  
  3. DECLARE SUB HitKey ()
  4. DECLARE SUB HelpUser ()
  5. DECLARE SUB ReadCommandLine (Command1$, Command2$, Drive$, Path$, Code$)
  6. DECLARE SUB Delay (Seconds!)
  7. DECLARE SUB ReadDEF (BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  8. DECLARE SUB Filter (Name$)
  9. DECLARE SUB RBBSBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag!)
  10. DECLARE SUB PcBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag!)
  11. DECLARE SUB FindFile (File$, FindSW!)
  12.     
  13.      TYPE PcBoardRecord
  14.        PcDummy1 AS STRING * 10
  15.        PcBaud AS STRING * 4
  16.        PcName AS STRING * 27
  17.        PcFirstName AS STRING * 15
  18.        PcGraphicsSw AS STRING * 2
  19.        PcDummy2 AS STRING * 71
  20.      END TYPE
  21.     
  22.      IF COMMAND$ = "" THEN CALL HelpUser
  23.  
  24.      CLS
  25.      PRINT "***********************************************"
  26.      PRINT "*    OPENDOOR.EXE                     1/1/89  *"
  27.      PRINT "* Fast Finger's Generic Ansi Graphics Utility *"
  28.      PRINT "* To Open Doors for BBS Systems that output   *"
  29.      PRINT "* PcBoard.Sys or DorInfo1.Def.  Release 1.0   *"
  30.      PRINT "***********************************************"
  31.      PRINT
  32.      CALL ReadCommandLine(Command1$, Command2$, Drive$, Path$, Code$)
  33.      PRINT
  34.      CALL ReadDEF(BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  35.      PRINT
  36.      IF Debug$ = "ON" THEN CALL Delay(5)
  37.      IF Command2$ = "LOCAL" THEN Port$ = "LOCAL"
  38.  
  39.      IF BBS$ = "PCBOARD.SYS" THEN
  40.          CALL PcBoard(BBS$, UFName$, ULName$, UTime$, HookUp$, OkFlag)
  41.          IF OkFlag THEN GOTO ChkHookUp
  42.        END IF
  43.      IF BBS$ = "DORINFO1.DEF" THEN
  44.          CALL RBBSBoard(BBS$, UFName$, ULName$, UTime$, HookUp$, OkFlag)
  45.          IF OkFlag THEN GOTO ChkHookUp
  46.        END IF
  47.  
  48.      PRINT "Sorry, but this release of  OPENDOOR.EXE does not yet support"
  49.      PRINT "the BBS door output you requested, => " + BBS$ + " in the"
  50.      PRINT "file named  OPENDOOR.DEF     *** ABORTING DOOR REQUEST *** "
  51.      CALL Delay(5)
  52.      END
  53.    
  54. ChkHookUp:
  55.     
  56.      IF HookUp$ = "LOCAL" THEN GOTO StartOutput
  57.      IF Port$ = "LOCAL" THEN HookUp$ = "LOCAL": GOTO StartOutput
  58.      HookUp$ = Port$ + HookUp$
  59.     
  60. StartOutput:
  61.     
  62.      IF VAL(UTime$) = 0 THEN UTime$ = MaxTime$
  63.      IF VAL(UTime$) > VAL(MaxTime$) THEN UTime$ = MaxTime$
  64.     
  65.      OutputFile$ = Path$ + "\" + "OPENDOOR.Sys"
  66.      FileId = FREEFILE
  67.  
  68.      OPEN OutputFile$ FOR OUTPUT AS #FileId
  69.        PRINT #FileId, BBSName$
  70.        PRINT #FileId, SysopFName$
  71.        PRINT #FileId, SysopLName$
  72.        PRINT #FileId, HookUp$
  73.        PRINT #FileId, UFName$
  74.        PRINT #FileId, ULName$
  75.        PRINT #FileId, UTime$
  76.        PRINT #FileId, Debug$
  77.      CLOSE #FileId
  78.      
  79.      IF Debug$ = "ON" THEN CALL Delay(5)
  80.      PRINT
  81.      PRINT "Data being Written into OPENDOOR.SYS"
  82.      PRINT
  83.      PRINT BBSName$
  84.      PRINT SysopFName$
  85.      PRINT SysopLName$
  86.      PRINT HookUp$
  87.      PRINT UFName$
  88.      PRINT ULName$
  89.      PRINT UTime$
  90.      PRINT Debug$
  91.      IF Debug$ = "ON" THEN CALL Delay(5)
  92.  
  93. StartDoor:
  94.  
  95.      SHELL Drive$
  96.      CHDIR Path$
  97.      RUN Code$: REM TURN OFF DURING DEVELOPMENT ****************************
  98.     
  99.      END
  100.  
  101. SUB Delay (Seconds)
  102.  
  103.   Time1! = TIMER
  104.   Time2! = Time1!
  105.  
  106. ChkWaitTime:
  107.  
  108.   Time2! = TIMER
  109.   WaitTime! = ABS(Time2! - Time1!)
  110.   IF WaitTime! >= Seconds THEN EXIT SUB
  111.   GOTO ChkWaitTime
  112.  
  113. END SUB
  114.  
  115. SUB Filter (Name$)
  116.  
  117.   A$ = UCASE$(Name$)
  118.   x = LEN(A$)
  119.   IF x < 1 THEN EXIT SUB
  120.  
  121.   FOR i = 1 TO x
  122.     B$ = MID$(A$, i, 1)
  123.     y = ASC(B$)
  124.     IF y < 65 OR y > 90 THEN MID$(Name$, i, 1) = "-"
  125.   NEXT i
  126.  
  127. END SUB
  128.  
  129. SUB FindFile (File$, FindSW)
  130.  
  131. '
  132. ' Input ...... File$ <= Path\Name of file to find
  133. ' Output ..... 1 = File Found
  134. '              0 = File Not Found
  135. '
  136.   FileId = FREEFILE
  137.   OPEN File$ FOR RANDOM AS #FileId LEN = 10
  138.   IF LOF(FileId) < 1 THEN FindSW = 0 ELSE FindSW = 1
  139.   CLOSE #FileId
  140.   IF FindSW = 0 THEN KILL File$
  141. '
  142. END SUB
  143.  
  144. SUB HelpUser
  145.  
  146.  CLS
  147.  Temp$ = " OPENDOOR " + COMMAND$
  148.  PRINT Temp$
  149.  
  150.  PRINT
  151.  PRINT "This BBS Door utility was written by Fast Fingers, the sysop of the"
  152.  PRINT "Tool Box BBS.  Its purpose is to allow the Ansi Graphics doors I   "
  153.  PRINT "have written to be easily interfaced with various BBS systems which"
  154.  PRINT "each have their own way of sending information critical to a door's"
  155.  PRINT "operation.  This is release 1.0 and the latest version can be found"
  156.  PRINT "at my bbs 313-247-0094 @ 2400 baud.                                            "
  157.  PRINT
  158.  PRINT "Input comes from a text file you should create named  OPENDOOR.DEF  "
  159.  PRINT "and the command line that calls this program.  Output is placed in "
  160.  PRINT "the same directory as the door being called and is another text file"
  161.  PRINT "called  OPENDOOR.SYS  This program will switch to the door's drive  "
  162.  PRINT "and directory and then call the door.  This program and it's DEF   "
  163.  PRINT "file should be placed in the same directory as your BBS.  You can  "
  164.  PRINT "see these instructions anytime by simply typing in  OPENDOOR without"
  165.  PRINT "any command line input.                                            "
  166.  PRINT "                                                                   "
  167.  PRINT "This release of  OPENDOOR will support Local operation and/or input "
  168.  PRINT "from RBBS with (DORINFO1.DEF); and TAG or PCBOARD with (PCBOARD.SYS)."
  169.  PRINT
  170.  CALL HitKey
  171.  
  172.  CLS
  173.  PRINT " OPENDOOR.EXE ... Command Line Input"
  174.  PRINT
  175.  PRINT "  This Program requires input on the Command Line"
  176.  PRINT "    The first argument is the full name and location of"
  177.  PRINT "    the ansi graphics door to be run and it is required."
  178.  PRINT "    The second argument is optional and signals that you"
  179.  PRINT "    wish to run the door in local mode."
  180.  PRINT
  181.  PRINT "  For Example:"
  182.  PRINT "      OPENDOOR.EXE D:\Tag\Games\Maze.EXE"
  183.  PRINT "      OPENDOOR.EXE D:\RBBS\DOORS\BJACK.EXE LOCAL"
  184.  PRINT
  185.  CALL HitKey
  186.  
  187.  CLS
  188.  PRINT " OPENDOOR.EXE ...  OPENDOOR.DEF Input"
  189.  PRINT
  190.  PRINT "  Note: Both  OPENDOOR.EXE and  OPENDOOR.DEF should be in the"
  191.  PRINT "        same directory as your BBS and this should be the"
  192.  PRINT "        current directory!"
  193.  PRINT
  194.  PRINT "   OPENDOOR.DEF Format:      <= Text File"
  195.  PRINT "    BBS Name                <= Line 1"
  196.  PRINT "    Sysop's First Name      <= Line 2"
  197.  PRINT "    Sysop's Last Name       <= Line 3"
  198.  PRINT "    Port                    <= Line 4"
  199.  PRINT "    BBS Info for Doors      <= Line 5"
  200.  PRINT "    Max. Door Time          <= Line 6 (Minutes)"
  201.  PRINT "    DebugSwitch             <= Line 7 (ON or OFF)"
  202.  PRINT
  203.  PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  204.  PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  205.  PRINT
  206.  CALL HitKey
  207.  
  208.  CLS
  209.  PRINT " OPENDOOR.EXE ... Local Mode Operation"
  210.  PRINT
  211.  PRINT "  Use of LOCAL on the command line will force door to run in"
  212.  PRINT "  local mode.  LOCAL in either line 4 or line 5 of the file"
  213.  PRINT "   OPENDOOR.DEF will also force Local operation."
  214.  PRINT
  215.  PRINT "  Some BBS systems also allow the BBS to execute doors directly"
  216.  PRINT "  in local mode.  PcBoard and TAG support this mode of operation"
  217.  PRINT "  and this situation is reflected in the information passed to"
  218.  PRINT "  the door in the file PCBOARD.SYS  "
  219.  PRINT
  220.  CALL HitKey
  221.  
  222.  CLS
  223.  PRINT " OPENDOOR.EXE ... Output ( OPENDOOR.SYS)"
  224.  PRINT
  225.  PRINT "  Output from this program is put in a file named  OPENDOOR.SYS"
  226.  PRINT "  This file in placed in the same directory where the door is"
  227.  PRINT "  located.  This is a simple text file with the following format."
  228.  PRINT
  229.  PRINT " OPENDOOR.SYS ... Format/Example"
  230.  PRINT
  231.  PRINT "The Tool Box        <= Line #1 ... BBS Name"
  232.  PRINT "Fast                <= Line #2 ... Sysop's First Name"
  233.  PRINT "Fingers             <= Line #3 ... Sysop's Last Name"
  234.  PRINT "COM1: 2400,N,8,1    <= Line #4 ... Open Modem Info"
  235.  PRINT "Joe                 <= Line #5 ... User's First Name"
  236.  PRINT "Smith               <= Line #6 ... User's Last Name"
  237.  PRINT "60                  <= Line #7 ... Minutes Allowed in Door "
  238.  PRINT "OFF                 <= Line #8 ... Debug ON or OFF"
  239.  PRINT
  240.  CALL HitKey
  241.  
  242.  CLS
  243.  PRINT " OPENDOOR.EXE ... Support for Other BBS Systems"
  244.  PRINT
  245.  PRINT "  Over time I suppect logic will be added for a growing list of"
  246.  PRINT "  BBS systems.  However, in the hope of allowing you to bring up"
  247.  PRINT "  an unsupported system I have encluded a copy of the Quick Basic"
  248.  PRINT "  Release 4.0 source code.  The code is quite structured and really"
  249.  PRINT "  requires only one subroutine be added to support each new BBS."
  250.  PRINT
  251.  PRINT "  The trick of course is understanding how to locate and read the"
  252.  PRINT "  information your bbs has about the current attached user.  The"
  253.  PRINT "  information required is:"
  254.  PRINT "    The user's name, the baud rate, the connection word length and"
  255.  PRINT "    stop bits, and the pariety of the connection.  You will also"
  256.  PRINT "    need to know if the callers terminal program will support"
  257.  PRINT "    ansi graphics."
  258.  PRINT
  259.  PRINT "  Good luck with the Ansi (Moving Graphics) Doors, Enjoy ..."
  260.  PRINT
  261.  PRINT "                                     Fast Fingers ..."
  262.  PRINT "                                     313-247-0094"
  263.  PRINT
  264.  CALL HitKey
  265.  
  266.  END
  267.  
  268. END SUB
  269.  
  270. SUB HitKey
  271.  
  272.     PRINT "                 => Hit Any Key to Continue <="
  273.     A$ = ""
  274. WaitKey:
  275.     A$ = INKEY$
  276.     IF A$ = "" THEN GOTO WaitKey
  277.    
  278. END SUB
  279.  
  280. SUB PcBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag)
  281.     
  282.      DIM RecPtr AS PcBoardRecord
  283.  
  284.      REM Default Output Values
  285.     
  286.      OkFlag = 1
  287.      FirstName$ = "Fast"
  288.      LastName$ = "Fingers"
  289.      UTime$ = "0"
  290.      HookUp$ = "LOCAL"
  291.     
  292. '
  293. '    Logic for Reading PcBoard.Sys Door Data
  294. '
  295.      IF UCASE$(BBS$) <> "PCBOARD.SYS" THEN
  296.        OkFlag = 0
  297.        EXIT SUB
  298.      END IF
  299.  
  300.      CALL FindFile(BBS$, FindSW)
  301.      IF FindSW = 0 THEN
  302.        PRINT "The PcBoard BBS logic could not find the file => " + BBS$
  303.        CALL Delay(2)
  304.        OkFlag = 0
  305.        EXIT SUB
  306.      END IF
  307.  
  308.      FileNo = FREEFILE
  309.      OPEN BBS$ FOR RANDOM AS #FileNo LEN = 129
  310.        GET #FileNo, 1, RecPtr
  311.        Baud$ = LTRIM$(RTRIM$(RecPtr.PcBaud))
  312.        FullName$ = LTRIM$(RTRIM$(RecPtr.PcName))
  313.        FirstName$ = LTRIM$(RTRIM$(RecPtr.PcFirstName))
  314.        GraphicsSW$ = LTRIM$(RTRIM$(RecPtr.PcGraphicsSw))
  315.      CLOSE #FileNo
  316.  
  317.      IF Baud$ = "LOCA" THEN
  318.        HookUp$ = "LOCAL"
  319.      ELSE
  320.        IF GraphicsSW$ = "-1" THEN
  321.          HookUp$ = Baud$ + ",N,8,1"
  322.        ELSE
  323.          OkFlag = 0: REM Not an Ansi Graphics User
  324.          EXIT SUB
  325.        END IF
  326.      END IF
  327.     
  328.      LenFName = LEN(FirstName$)
  329.      LenFullName = LEN(FullName$)
  330.      IF LenFName + 2 >= LenFullName THEN
  331.        LastName$ = FirstName$
  332.        FirstName$ = "Mr"
  333.      ELSE
  334.        LastName$ = MID$(FullName$, LenFName + 2, LenFullName - LenFName - 1)
  335.      END IF
  336.      CALL Filter(FirstName$)
  337.      CALL Filter(LastName$)
  338.     
  339.      PRINT "BBS Door File Analysis for => PCBOARD.SYS"
  340.      PRINT "  Hookup ....... "; HookUp$
  341.      PRINT "  First Name ... "; FirstName$
  342.      PRINT "  Last Name .... "; LastName$
  343. '    PRINT "  PcGraphicsSw . "; GraphicsSW$
  344.  
  345.      EXIT SUB
  346. '
  347. END SUB
  348.  
  349. SUB RBBSBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag)
  350.  
  351.      REM Default Output Values
  352.    
  353.      OkFlag = 1
  354.      FirstName$ = "Fast"
  355.      LastName$ = "Fingers"
  356.      UTime$ = "0"
  357.      HookUp$ = "LOCAL"
  358.  
  359. '    REM legal OUTPUT format expected  "2400,N,8,1" <= HookUp$ .. sub output
  360. '    REM legal INPUT  format expected  "2400 BAUD,8,N,1" <= Baud$ .. dorinfo1
  361.  
  362. '
  363. '    Logic for Reading DorInfo1.Def Door Data
  364. '
  365.      IF UCASE$(BBS$) <> "DORINFO1.DEF" THEN
  366.        OkFlag = 0
  367.        EXIT SUB
  368.      END IF
  369.  
  370.      CALL FindFile(BBS$, FindSW)
  371.      IF FindSW = 0 THEN
  372.        PRINT "The DorInfo1.Def BBS logic could not find the file => " + BBS$
  373.        CALL Delay(2)
  374.        OkFlag = 0
  375.        EXIT SUB
  376.      END IF
  377.  
  378.      FileNo = FREEFILE
  379.      OPEN BBS$ FOR INPUT AS #FileNo
  380.        LINE INPUT #FileNo, BBSName$
  381.        LINE INPUT #FileNo, SysopFirstName$
  382.        LINE INPUT #FileNo, SysopLastName$
  383.        LINE INPUT #FileNo, ComPort$
  384.        LINE INPUT #FileNo, Baud$
  385.        LINE INPUT #FileNo, Switch1$
  386.        LINE INPUT #FileNo, FirstName$
  387.        LINE INPUT #FileNo, LastName$
  388.        LINE INPUT #FileNo, Address$
  389.        LINE INPUT #FileNo, Switch2$
  390.        LINE INPUT #FileNo, SecurityLevel$
  391.        LINE INPUT #FileNo, UTime$
  392.  
  393.        GraphicsSW$ = "?": REM  fix later ********************************
  394.  
  395.      CLOSE #FileNo
  396.  
  397.      FullName$ = FirstName$ + " " + LastName$
  398.      LenFName = LEN(FirstName$)
  399.      LenFullName = LEN(FullName$)
  400.      IF LenFName + 2 >= LenFullName THEN
  401.        LastName$ = FirstName$
  402.        FirstName$ = "Mr"
  403.      END IF
  404.      CALL Filter(FirstName$)
  405.      CALL Filter(LastName$)
  406.     
  407.      x = INSTR(1, ComPort$, "0")
  408.      IF x THEN
  409.        HookUp$ = "LOCAL"
  410.        GOTO QuitRbbsBoard
  411.      END IF
  412.  
  413.      x = INSTR(1, Baud$, "LOC")
  414.     
  415.      IF x > 0 THEN
  416.        HookUp$ = "LOCAL"
  417.      ELSE
  418.        x = LEN(Baud$)
  419.        x1 = INSTR(1, Baud$, " BAUD")
  420.        x2 = INSTR(1, Baud$, ",")
  421.        IF x1 = 0 OR x2 = 0 OR x1 > (x2 - 1) THEN
  422.          OkFlag = 0
  423.          PRINT "confused with first line of dorinfo1.def .. bad format"
  424.          EXIT SUB
  425.        ELSE
  426.          A$ = MID$(Baud$, 1, x1 - 1)
  427.          B$ = MID$(Baud$, x2, x - x2 + 1)
  428.          HookUp$ = A$ + B$
  429.          x1 = INSTR(1, HookUp$, "N")
  430.          x2 = INSTR(1, HookUp$, "8")
  431.          x3 = INSTR(1, HookUp$, "1")
  432.          IF x1 < 1 OR x2 < 1 OR x3 < 1 THEN
  433.            OkFlag = 0
  434.            PRINT "Not Graphics User based upon PARITY, DATA/STOP BITS"
  435.            EXIT SUB
  436.          END IF
  437.        END IF
  438.      END IF
  439.   
  440. QuitRbbsBoard:
  441.  
  442.      PRINT "BBS Door File Analysis for => DORINFO1.DEF"
  443.      PRINT "  Hookup ....... "; HookUp$
  444.      PRINT "  First Name ... "; FirstName$
  445.      PRINT "  Last Name .... "; LastName$
  446. '    PRINT "  PcGraphicsSw . "; GraphicsSW$
  447.  
  448.      EXIT SUB
  449. '
  450.  
  451.  
  452. END SUB
  453.  
  454. SUB ReadCommandLine (Command1$, Command2$, Drive$, Path$, Code$)
  455. '
  456. '    Logic for Local Mode Command input to  OPENDOOR.BAS
  457. '
  458.      Temp$ = UCASE$(COMMAND$)
  459.    
  460.      IF LEN(Temp$) < 1 THEN CALL HelpUser
  461. '
  462. '    Initilize OUTPUT to Defaults
  463. '
  464.      Command1$ = ""
  465.      Command2$ = ""
  466.      Drive$ = "C:"
  467.      Path$ = "C:\TAG"
  468.      Code$ = "Dummy.EXE"
  469. '
  470. '    Strip out first Command
  471. '
  472.      FOR i = 1 TO LEN(Temp$)
  473.        A$ = MID$(Temp$, i, 1)
  474.        IF A$ = " " THEN
  475.          IF (i + 1) > LEN(Temp$) THEN Command2$ = "LOCAL"
  476.          GOTO Lab1:
  477.        END IF
  478.        Command1$ = Command1$ + A$
  479.      NEXT i
  480.  
  481. Lab1:         
  482.      CALL FindFile(Command1$, FindSW)
  483.      IF FindSW = 0 THEN
  484.        PRINT "   OPENDOOR could not find => " + Command1$
  485.        PRINT "  Program Aborting Door Execution"
  486.        END
  487.      END IF
  488. '
  489. '    Strip out Path from Command1
  490. '
  491.      Path$ = Command1$
  492. Loop1:
  493.      x = LEN(Path$)
  494.      IF x < 2 THEN
  495.        PRINT "   OPENDOOR could not understand the path for the door"
  496.        PRINT "  Program Aborting Door Execution"
  497.        END
  498.      END IF
  499.      A$ = MID$(Path$, x, 1)
  500.      Path$ = MID$(Path$, 1, x - 1)
  501.      IF A$ <> "\" THEN GOTO Loop1
  502.     
  503.      Drive$ = UCASE$(MID$(Path$, 1, 2))
  504.      IF MID$(Drive$, 2, 1) <> ":" THEN Drive$ = "C:"
  505.      Code$ = MID$(Command1$, x + 1, LEN(Command1$) - x)
  506.     
  507.      PRINT "Command Line Analysis"
  508.      PRINT "  Command #1 ..... => "; Command1$
  509.      PRINT "  Command #2 ..... => "; Command2$
  510.      PRINT "  The Door is Program ................. => "; Code$
  511.      PRINT "  The Door is on Drive ................ => "; Drive$
  512.      PRINT "  The Door is located in Directory .... => "; Path$
  513.     
  514. END SUB
  515.  
  516. SUB ReadDEF (BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  517.     
  518.      PRINT "Reading file ...  OPENDOOR.Def"
  519.      CALL FindFile("OPENDOOR.Def", FindSW)
  520.      IF FindSW = 0 THEN
  521.        BEEP
  522.        PRINT "  OPENDOOR could not find file =>  OPENDOOR.DEF"
  523.        PRINT "  Note: Both  OPENDOOR.EXE and  OPENDOOR.DEF should be in the"
  524.        PRINT "        same directory as your BBS and this should be the"
  525.        PRINT "        current directory!"
  526.        PRINT
  527.        PRINT "  OPENDOOR.DEF Format:      <= Text File"
  528.        PRINT "    BBS Name                <= Line 1"
  529.        PRINT "    Sysop's First Name      <= Line 2"
  530.        PRINT "    Sysop's Last Name       <= Line 3"
  531.        PRINT "    Port                    <= Line 4"
  532.        PRINT "    BBS Output to Doors     <= Line 5"
  533.        PRINT "    Maximum Time in door    <= Line 6 (Minutes)"
  534.        PRINT "    DebugSwitch             <= Line 7 (ON or OFF)"
  535.        PRINT
  536.        PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  537.        PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  538.        PRINT
  539.        PRINT "  Program Aborting Door Execution"
  540.        CALL Delay(5)
  541.        PRINT
  542.        END
  543.      END IF
  544.    
  545.      FileId = FREEFILE
  546.  
  547.      OPEN "OPENDOOR.def" FOR INPUT AS #FileId
  548.       
  549.        INPUT #FileId, BBSName$
  550.        PRINT "  BBSName$ ................. "; BBSName$
  551.       
  552.        INPUT #FileId, SysopFName$
  553.        CALL Filter(SysopFName$)
  554.        PRINT "  Sysop's First Name ....... "; SysopFName$
  555.       
  556.        INPUT #FileId, SysopLName$
  557.        CALL Filter(SysopLName$)
  558.        PRINT "  Sysop's Last Name ........ "; SysopLName$
  559.       
  560.        INPUT #FileId, Port$
  561.        Port$ = RTRIM$(LTRIM$(UCASE$(Port$)))
  562.        IF Port$ = "COM1:" THEN GOTO OkPort
  563.        IF Port$ = "COM2:" THEN GOTO OkPort
  564.        IF Port$ = "COM3:" THEN GOTO OkPort
  565.        IF Port$ = "COM4:" THEN GOTO OkPort
  566.        IF Port$ = "LOCAL" THEN GOTO OkPort
  567.        PRINT
  568.        PRINT "   OPENDOOR.DEF Format:      <= Text File"
  569.        PRINT "    BBS Name                <= Line 1"
  570.        PRINT "    Sysop's First Name      <= Line 2"
  571.        PRINT "    Sysop's Last Name       <= Line 3"
  572.        PRINT "    Port                    <= Line 4"
  573.        PRINT "    BBS Output to Doors     <= Line 5"
  574.        PRINT "    Max Door Time (Minutes) <= Line 6"
  575.        PRINT
  576.        PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  577.        PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  578.        PRINT
  579.        PRINT "  Program Aborting Door Execution because LINE 4 is BAD"
  580.        CALL Delay(5)
  581.        PRINT
  582.        END
  583. OkPort:
  584.        PRINT "  Com Port Used by Doors ... "; Port$
  585.       
  586.        INPUT #FileId, BBS$
  587.        BBS$ = UCASE$(BBS$)
  588.        PRINT "  Type of BBS Door Output .. "; BBS$
  589.       
  590.        INPUT #FileId, MaxTime$
  591.        PRINT "  Max. Minutes in Door ..... "; MaxTime$
  592.  
  593.        INPUT #FileId, Debug$
  594.        Debug$ = UCASE$(Debug$)
  595.        IF Debug$ <> "ON" THEN Debug$ = "OFF"
  596.        PRINT "  Debug Switch ............. "; Debug$
  597.       
  598.      CLOSE #FileId
  599.      
  600. END SUB
  601.  
  602.